#!/usr/bin/python
 
# ls log to Coffee Machine classfiles list syntax
 
# Author: Sergey Vartanov (me@enzet.ru)
 
import sys
 
import os
 
target_dir = sys.argv[1]
classfiles = open(sys.argv[2], "w")

for root,dirs,files in os.walk(sys.argv[1]):
    for file in files:
                    classfiles.write(os.path.relpath(os.path.join(root, file), target_dir).replace(".class", "") + "\n  #\n")
